﻿using CodeCube.Service.Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace CodeCube.Service.DtoModel
{

    /// <summary>
    /// 管理员登录，获得菜单权限列表
    /// </summary>
    public class SysMenuDto:SysMenuModel
    {
        public SysMenuDto(SysMenuModel mdl)
        {
            Guid = mdl.Guid;
            Name = mdl.Name;
            NameCode = mdl.NameCode;
            Icon = mdl.Icon;
            Style = mdl.Style;
            FontColor = mdl.FontColor;
            BGColor = mdl.BGColor;
            Level = mdl.Level;
            Path = mdl.Path;
            ParentGuid = mdl.ParentGuid;
            Url = mdl.Url;
            BadgeStyle = mdl.BadgeStyle;
            Badge = mdl.Badge;
            EjectMode = mdl.EjectMode;
            PowerLevel = mdl.PowerLevel;
            Sort = mdl.Sort;
        }
        /// <summary>
        /// 子级菜单
        /// </summary>
        public List<SysMenuDto> Child { get; set; }

        /// <summary>
        /// 用户登录次数和过期时间配置
        /// </summary>
        public class SysAdminLoginConfig
        {
            /// <summary>
            /// 登录次数
            /// </summary>
            public int Count { get; set; } = 0;

            /// <summary>
            /// 过期时间-分钟
            /// </summary>
            public DateTime? DelayMinute { get; set; }
        }
    }

}
